/****** Object:  Stored Procedure [dbo].sporderUpdate Script Date: 11/24/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[sporderUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[sporderUpdate]
GO

/******************************************************************************
**		Name: [dbo].sporderUpdate
**		Desc:
**
**		Return values:
**
**		Called by:
**
**		Parameters:
**		Input						Output
**		----------					----------
**
**		Auth: MinhSong
**		Date: 11/24/2012
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**
*******************************************************************************/

CREATE PROCEDURE [dbo].[sporderUpdate]
(
	@OrderID int,
	@StoreID int,
	@ReciverName nvarchar(50),
	@PhoneNumber nchar(20),
	@Address1 nvarchar(100),
	@Address2 nvarchar(100),
	@UpdateBy nvarchar(50),
	@Customer nvarchar(50)
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_order]
SET [StoreID] = @StoreID,
	[ReciverName] = @ReciverName,
	[PhoneNumber] = @PhoneNumber,
	[Address1] = @Address1,
	[Address2] = @Address2,
	[UpdateBy] = @UpdateBy,
	[UpdateDate] = getdate(),
	[Customer] = @Customer
WHERE	[OrderID] = @OrderID
GO

--GRANT EXECUTE ON [dbo].[sporderUpdate] TO [sa]
--GO
